package com.iran.observer;

import java.util.Observable;
import java.util.Observer;

public class ConcreteObserver implements Observer {
    private String message;

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public void update(Observable o, Object arg) {
        this.message = ((ConcreteSubject)o).getMsg();
        //System.out.println("发生了改变");
    }
}
